export let defaultConfig = {
  port: 4567,
  // token key
  webJwtConfig: {
    secret: 'yh45vf51nMmj2LPXQssN', // 秘钥
    expiresIn: '30d', // 过期时间 1 天
  },
  //请求参数加密key
  aeskey: '7843565827918888',
  //路由md5
  MD5KEY: 'hfu9CkqRMAVdhq2w',
  NODE_ENV: process.env.NODE_ENV || 'dev',
  weixin: {
    appid: process.env.WEIXIN_APPID, // 小程序 appid
    secret: process.env.WEIXIN_SECRET, // 小程序密钥
  },
  roomCacheTime:  120 * 60,
  scoreCacheTime: 60 * 60,
  redisIps: [],
};
export const wsGlobal = {
  port: 4567,
  host: '',
  host_ip: '',
  $socketChat: Object.entries,
};

export function setDefaultConfig() {
  defaultConfig = {
    port: 4567,
    // token key
    webJwtConfig: {
      secret: 'yh45vf51nMmj2LPXQssN', // 秘钥
      expiresIn: '1d', // 过期时间 1 天
    },
    //请求参数加密key
    aeskey: '7843565827918888',
    //路由md5
    MD5KEY: 'hfu9CkqRMAVdhq2w',
    NODE_ENV: process.env.NODE_ENV || 'dev',
    weixin: {
      appid: process.env.WEIXIN_APPID, // 小程序 appid
      secret: process.env.WEIXIN_SECRET, // 小程序密钥
    },
    roomCacheTime: 86400,
    scoreCacheTime: 30 * 60,
    redisIps: ['192.168.153.100'],
  };
}
